From: Stephen Dolan Date: Mon, 30 Jun 2025 12:58:36 +0000 (+0100) Subject: Increase the amount of data written to a pipe in a test X-Git-Tag: archive/raspbian/5.4.0-2+rpi1^2~1 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22Programmet/%22http:/www.example.com/cgi/%22https:/%22Programmet?a=commitdiff_plain;h=77799461f6c8c68691516dacdbdea34049c6f38c;p=ocaml.git Increase the amount of data written to a pipe in a test On some OSes, you need to write more than 1MB of data to a pipe before writes block, and read more than 64k to unblock them. Bug-Debian: https://bugs.debian.org/1107773 Origin: https://github.com/ocaml/ocaml/pull/14116 Gbp-Pq: Name Increase-the-amount-of-data-written-to-a-pipe-in-a-test.patch --- diff --git a/testsuite/tests/lib-channels/close_during_flush.ml b/testsuite/tests/lib-channels/close_during_flush.ml index 39ef2fbc..08e6f6e0 100644 --- a/testsuite/tests/lib-channels/close_during_flush.ml +++ b/testsuite/tests/lib-channels/close_during_flush.ml @@ -11,7 +11,7 @@ let () = Unix.set_nonblock wr; let buf = Bytes.make 1000 '!' in begin match - for i = 1 to 1000 do + for i = 1 to 10_000 do ignore (Unix.write wr buf 0 1000) done with @@ -25,7 +25,7 @@ let () = output ch buf 0 1000; let alarm_handler _ = (* clear some space *) - Unix.read rd (Bytes.make 10_000 '?') 0 10_000 |> ignore; + Unix.read rd (Bytes.make 100_000 '?') 0 100_000 |> ignore; close_out ch in Sys.signal Sys.sigalrm (Signal_handle alarm_handler) |> ignore;